package org.bonorsoft.modules.dingding.mapper;

import org.apache.ibatis.annotations.Select;
import org.bonorsoft.modules.dingding.entity.SysDepart;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
 * @Description: 组织结构
 * @Author: WilliamYe
 * @Date:   2020-11-13
 * @Version: V1.0
 */
public interface SysDepartMapper extends BaseMapper<SysDepart> {

    @Select("select * from sys_depart where dept_id IN ( select dept_id from sys_user_depart where user_id = #{userid} )")
    List<SysDepart> queryUserDeparts(String userid);
}
